<?php
/* @var $this SiteController */
/* @var $model LoginForm */
/* @var $form CActiveForm  */

/*$this->pageTitle=Yii::app()->name . ' - Login';
$this->breadcrumbs=array(
	'Login',
);*/
?>

<!-- <h1>Login</h1>

<p>Please fill out the following form with your login credentials:</p>

<div class="form">
<?php /*$form=$this->beginWidget('CActiveForm', array(
	'id'=>'login-form',
	'enableClientValidation'=>true,
	'clientOptions'=>array(
		'validateOnSubmit'=>true,
	),
));*/ ?>

	<p class="note">Fields with <span class="required">*</span> are required.</p>

	<div class="row">
		<?php //echo $form->labelEx($model,'username'); ?>
		<?php //echo $form->textField($model,'username'); ?>
		<?php //echo $form->error($model,'username'); ?>
	</div>

	<div class="row">
		<?php //echo $form->labelEx($model,'password'); ?>
		<?php //echo $form->passwordField($model,'password'); ?>
		<?php //echo $form->error($model,'password'); ?>
		<p class="hint">
			Hint: You may login with <kbd>demo</kbd>/<kbd>demo</kbd> or <kbd>admin</kbd>/<kbd>admin</kbd>.
		</p>
	</div>

	<div class="row rememberMe">
		<?php //echo $form->checkBox($model,'rememberMe'); ?>
		<?php //echo $form->label($model,'rememberMe'); ?>
		<?php //echo $form->error($model,'rememberMe'); ?>
	</div>

	<div class="row buttons">
		<?php //echo CHtml::submitButton('Login'); ?>
	</div>

<?php //$this->endWidget(); ?>
</div><! form -->
<script>
	//$('#mainmenu').hide();
	document.getElementById('mainmenu').style.display='none';
	document.getElementById('footer').style.display='none';
</script>
<style>
	body {
	  padding-top: 40px;
	  padding-bottom: 40px;
	  background-color: #eee;
	}

	.form-signin {
	  max-width: 330px;
	  padding: 15px;
	  margin: 0 auto;
	}
	.form-signin .form-signin-heading,
	.form-signin .checkbox {
	  margin-bottom: 10px;
	}
	.form-signin .checkbox {
	  font-weight: normal;
	}
	.form-signin .form-control {
	  position: relative;
	  height: auto;
	  -webkit-box-sizing: border-box;
	     -moz-box-sizing: border-box;
	          box-sizing: border-box;
	  padding: 10px;
	  font-size: 16px;
	}
	.form-signin .form-control:focus {
	  z-index: 2;
	}
	.form-signin input[type="email"] {
	  margin-bottom: -1px;
	  border-bottom-right-radius: 0;
	  border-bottom-left-radius: 0;
	}
	.form-signin input[type="password"] {
	  margin-bottom: 10px;
	  border-top-left-radius: 0;
	  border-top-right-radius: 0;
	}

</style>



<?php
	$form = $this->beginWidget('bootstrap.widgets.BsActiveForm', array(
	    'enableAjaxValidation' => true,
	    'id' => 'login-form',
	    'htmlOptions' => array(
	        'class' => 'form-signin'
	    )
	));
?>
<h2 class="form-signin-heading">Please sign in</h2>
<?php
	echo $form->textField($model, 'username', array(
	    'placeholder' => 'Username',
	    'autofocus'=>true,
	));
	?>
<?php
	echo $form->passwordField($model, 'password', array(
	    'placeholder' => 'Password'
	));
?>
<?php
	echo $form->checkBoxControlGroup($model, 'rememberMe');
?>
<?php
	echo BsHtml::submitButton('Sign in', array(
		//'type'=>'login',
		//'url'=>'site/login',
		'block'=>true,
	    'color' => BsHtml::BUTTON_COLOR_PRIMARY,
	    'size' => BsHtml::BUTTON_SIZE_LARGE,
	));
?>

<?php
$this->endWidget();
?>
<div class="login-error" >
	<?php //echo CHtml::errorSummary($model); ?>
	<?php 
		if(CHtml::errorSummary($model))
			echo BsHtml::alert(BsHtml::ALERT_COLOR_DANGER, BsHtml::bold('Please fix the following input errors: ') . 'Incorrect username or password.'); 
	?>
</div>
    


<!-- <form class="form-signin" role="form">
    <h2 class="form-signin-heading">Please sign in</h2>
    <input type="username" class="form-control" placeholder="Username" required autofocus>
    <input type="password" class="form-control" placeholder="Password" required>
    <label class="checkbox">
        <input type="checkbox" value="remember-me"> Remember me
    </label>
    <button class="btn btn-lg btn-primary btn-block" type="submit">Sign in</button>
</form> -->
